import java.util.LinkedList;

public class Session {
	
    private LinkedList<Problem> LLproblems = new LinkedList<Problem>();
    private int iproblemCounter = 0;
	private boolean bisRewardedPhase = false;
	private boolean showProgressBar = false;
	private String sessionName = "New Session";
	private String sessionType = "";
	
	public Session(boolean bisReward){
		bisRewardedPhase = bisReward;
	}
    public void addProblem (boolean type){
        LLproblems.add(new Problem(type));
        iproblemCounter++;
    }
    public void addProblemComparison (int index, String compImg, boolean answer){
        Problem problemEdit = LLproblems.get(index);
        problemEdit.addComparison(compImg, answer);
    }
    public void addProblemReinforcer (int index, int reinforcer){
        Problem problemEdit = LLproblems.get(index);
        problemEdit.setReinforcer(reinforcer);
    }
    public Problem getProblem (int index){
        return LLproblems.get(index);
    }
    public int getNoOfProblems (){
        return iproblemCounter;
    }
    public boolean isRewardedPhase(){
        return bisRewardedPhase;
    }
    
    public boolean getProgressBar(){
        return showProgressBar;
    }
    
    public String getSessionType (){
    	return sessionType;
    }
    
    public void setProgressBar(boolean bar){
        showProgressBar = bar;
    }
    
    public void setSessionType (String type){
    	sessionType = type;
    }
    
    public void setbisRewardedPhase (boolean isRewardedPhase){
    	bisRewardedPhase = isRewardedPhase;
    }

   public void removeProblem (int index){
	   LLproblems.remove(index);
	   iproblemCounter--;
   }
   
   public void setName (String name){
       sessionName = name;
   }

   public String getName (){
       return sessionName;
   }
}
